﻿using System.Text;
using NUnit.Framework;

namespace ExtensionMethodExtravaganza.Tests
{
	[TestFixture]
	public class StringBuilderExtensionsTests
	{
		[Test]
		public void AppendIfTest()
		{
			var sb = new StringBuilder();

			sb.AppendIf(true, 'a');
			sb.AppendIf(false, 'b');
			sb.AppendIf(true, "c");
			sb.AppendIf(false, "d");

			Assert.AreEqual("ac", sb.ToString());
		}
	}
}
